/*
 Navicat Premium Data Transfer

 Source Server         : demo
 Source Server Type    : MySQL
 Source Server Version : 80031
 Source Host           : localhost:3306
 Source Schema         : 2101-month9

 Target Server Type    : MySQL
 Target Server Version : 80031
 File Encoding         : 65001

 Date: 06/07/2023 19:04:40
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for apartment
-- ----------------------------
DROP TABLE IF EXISTS `apartment`;
CREATE TABLE `apartment` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `idx_name` (`name`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb3;

-- ----------------------------
-- Records of apartment
-- ----------------------------
BEGIN;
INSERT INTO `apartment` (`id`, `name`) VALUES (2, '上地3号楼');
INSERT INTO `apartment` (`id`, `name`) VALUES (1, '上地5号楼');
INSERT INTO `apartment` (`id`, `name`) VALUES (5, '北辰1号楼');
INSERT INTO `apartment` (`id`, `name`) VALUES (4, '北辰3号楼');
INSERT INTO `apartment` (`id`, `name`) VALUES (3, '北辰5号楼');
COMMIT;

-- ----------------------------
-- Table structure for city
-- ----------------------------
DROP TABLE IF EXISTS `city`;
CREATE TABLE `city` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8mb3;

-- ----------------------------
-- Records of city
-- ----------------------------
BEGIN;
INSERT INTO `city` (`id`, `name`) VALUES (1, '济南');
INSERT INTO `city` (`id`, `name`) VALUES (2, '聊城');
INSERT INTO `city` (`id`, `name`) VALUES (3, '晋城');
INSERT INTO `city` (`id`, `name`) VALUES (4, '太原');
INSERT INTO `city` (`id`, `name`) VALUES (5, '郑州');
INSERT INTO `city` (`id`, `name`) VALUES (6, '洛阳');
INSERT INTO `city` (`id`, `name`) VALUES (7, '石家庄');
INSERT INTO `city` (`id`, `name`) VALUES (8, '邯郸');
INSERT INTO `city` (`id`, `name`) VALUES (9, '张家口');
INSERT INTO `city` (`id`, `name`) VALUES (10, '南京');
INSERT INTO `city` (`id`, `name`) VALUES (11, '苏州');
INSERT INTO `city` (`id`, `name`) VALUES (12, '徐州');
COMMIT;

-- ----------------------------
-- Table structure for house
-- ----------------------------
DROP TABLE IF EXISTS `house`;
CREATE TABLE `house` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `province_id` int DEFAULT NULL,
  `city_id` int DEFAULT NULL,
  `qu_id` int DEFAULT NULL,
  `status` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `id_p_c_q` (`province_id`,`city_id`,`qu_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=69 DEFAULT CHARSET=utf8mb3;

-- ----------------------------
-- Records of house
-- ----------------------------
BEGIN;
INSERT INTO `house` (`id`, `name`, `province_id`, `city_id`, `qu_id`, `status`) VALUES (1, '恒大1期', 1, 1, 1, '在售');
INSERT INTO `house` (`id`, `name`, `province_id`, `city_id`, `qu_id`, `status`) VALUES (2, '恒大2期', 1, 2, 2, '在售');
INSERT INTO `house` (`id`, `name`, `province_id`, `city_id`, `qu_id`, `status`) VALUES (3, '恒大3期', 1, 3, 2, '入住');
INSERT INTO `house` (`id`, `name`, `province_id`, `city_id`, `qu_id`, `status`) VALUES (4, '恒大4期', 1, 3, 2, '在售');
INSERT INTO `house` (`id`, `name`, `province_id`, `city_id`, `qu_id`, `status`) VALUES (5, '恒大5期', 1, 2, 2, '停工');
INSERT INTO `house` (`id`, `name`, `province_id`, `city_id`, `qu_id`, `status`) VALUES (6, '恒大6期', 1, 2, 2, '在售');
INSERT INTO `house` (`id`, `name`, `province_id`, `city_id`, `qu_id`, `status`) VALUES (7, '恒大7期', 1, 2, 2, '在售');
INSERT INTO `house` (`id`, `name`, `province_id`, `city_id`, `qu_id`, `status`) VALUES (8, '恒大8期', 1, 3, 2, '入住');
INSERT INTO `house` (`id`, `name`, `province_id`, `city_id`, `qu_id`, `status`) VALUES (9, '恒大9期', 1, 3, 2, '在售');
INSERT INTO `house` (`id`, `name`, `province_id`, `city_id`, `qu_id`, `status`) VALUES (10, '恒大10期', 1, 2, 2, '停工');
INSERT INTO `house` (`id`, `name`, `province_id`, `city_id`, `qu_id`, `status`) VALUES (11, '恒大11期', 1, 2, 2, '在售');
INSERT INTO `house` (`id`, `name`, `province_id`, `city_id`, `qu_id`, `status`) VALUES (12, '碧桂园2期', 2, 2, 2, '在售');
INSERT INTO `house` (`id`, `name`, `province_id`, `city_id`, `qu_id`, `status`) VALUES (13, '碧桂园3期', 2, 3, 2, '在售');
INSERT INTO `house` (`id`, `name`, `province_id`, `city_id`, `qu_id`, `status`) VALUES (14, '碧桂园4期', 2, 3, 2, '在售');
INSERT INTO `house` (`id`, `name`, `province_id`, `city_id`, `qu_id`, `status`) VALUES (15, '碧桂园5期', 2, 2, 2, '停工');
INSERT INTO `house` (`id`, `name`, `province_id`, `city_id`, `qu_id`, `status`) VALUES (16, '碧桂园6期', 2, 2, 2, '停工');
INSERT INTO `house` (`id`, `name`, `province_id`, `city_id`, `qu_id`, `status`) VALUES (17, '碧桂园6期', 2, 2, 2, '停工');
INSERT INTO `house` (`id`, `name`, `province_id`, `city_id`, `qu_id`, `status`) VALUES (18, '碧桂园7期', 2, 2, 2, '停工');
INSERT INTO `house` (`id`, `name`, `province_id`, `city_id`, `qu_id`, `status`) VALUES (19, '碧桂园8期', 2, 3, 2, '入住');
INSERT INTO `house` (`id`, `name`, `province_id`, `city_id`, `qu_id`, `status`) VALUES (20, '碧桂园9期', 2, 3, 2, '停工');
INSERT INTO `house` (`id`, `name`, `province_id`, `city_id`, `qu_id`, `status`) VALUES (21, '碧桂园10期', 2, 2, 2, '停工');
INSERT INTO `house` (`id`, `name`, `province_id`, `city_id`, `qu_id`, `status`) VALUES (22, '碧桂园11期', 2, 2, 2, '在售');
INSERT INTO `house` (`id`, `name`, `province_id`, `city_id`, `qu_id`, `status`) VALUES (23, '万科2期', 2, 2, 2, '在售');
INSERT INTO `house` (`id`, `name`, `province_id`, `city_id`, `qu_id`, `status`) VALUES (24, '万科3期', 2, 3, 2, '入住');
INSERT INTO `house` (`id`, `name`, `province_id`, `city_id`, `qu_id`, `status`) VALUES (25, '万科4期', 2, 3, 2, '在售');
INSERT INTO `house` (`id`, `name`, `province_id`, `city_id`, `qu_id`, `status`) VALUES (26, '万科5期', 2, 2, 2, '入住');
INSERT INTO `house` (`id`, `name`, `province_id`, `city_id`, `qu_id`, `status`) VALUES (27, '万科6期', 2, 2, 2, '入住');
INSERT INTO `house` (`id`, `name`, `province_id`, `city_id`, `qu_id`, `status`) VALUES (28, '万科7期', 2, 2, 2, '入住');
INSERT INTO `house` (`id`, `name`, `province_id`, `city_id`, `qu_id`, `status`) VALUES (29, '万科8期', 2, 3, 2, '入住');
INSERT INTO `house` (`id`, `name`, `province_id`, `city_id`, `qu_id`, `status`) VALUES (30, '万科9期', 2, 3, 2, '停工');
INSERT INTO `house` (`id`, `name`, `province_id`, `city_id`, `qu_id`, `status`) VALUES (31, '万科10期', 2, 2, 2, '停工');
INSERT INTO `house` (`id`, `name`, `province_id`, `city_id`, `qu_id`, `status`) VALUES (32, '万科11期', 2, 2, 2, '在售');
INSERT INTO `house` (`id`, `name`, `province_id`, `city_id`, `qu_id`, `status`) VALUES (33, '万科2期', 3, 3, 3, '在售');
INSERT INTO `house` (`id`, `name`, `province_id`, `city_id`, `qu_id`, `status`) VALUES (34, '万科3期', 3, 3, 3, '入住');
INSERT INTO `house` (`id`, `name`, `province_id`, `city_id`, `qu_id`, `status`) VALUES (35, '万科4期', 3, 3, 3, '在售');
INSERT INTO `house` (`id`, `name`, `province_id`, `city_id`, `qu_id`, `status`) VALUES (36, '万科5期', 3, 3, 3, '入住');
INSERT INTO `house` (`id`, `name`, `province_id`, `city_id`, `qu_id`, `status`) VALUES (37, '万科6期', 3, 3, 3, '入住');
INSERT INTO `house` (`id`, `name`, `province_id`, `city_id`, `qu_id`, `status`) VALUES (38, '万科7期', 3, 3, 3, '入住');
INSERT INTO `house` (`id`, `name`, `province_id`, `city_id`, `qu_id`, `status`) VALUES (39, '万科8期', 3, 3, 3, '入住');
INSERT INTO `house` (`id`, `name`, `province_id`, `city_id`, `qu_id`, `status`) VALUES (40, '万科9期', 3, 3, 3, '停工');
INSERT INTO `house` (`id`, `name`, `province_id`, `city_id`, `qu_id`, `status`) VALUES (41, '万科10期', 3, 3, 3, '停工');
INSERT INTO `house` (`id`, `name`, `province_id`, `city_id`, `qu_id`, `status`) VALUES (42, '万科11期', 3, 3, 3, '在售');
INSERT INTO `house` (`id`, `name`, `province_id`, `city_id`, `qu_id`, `status`) VALUES (43, '万科2期', 5, 3, 5, '在售');
INSERT INTO `house` (`id`, `name`, `province_id`, `city_id`, `qu_id`, `status`) VALUES (44, '万科3期', 5, 3, 5, '入住');
INSERT INTO `house` (`id`, `name`, `province_id`, `city_id`, `qu_id`, `status`) VALUES (45, '万科4期', 5, 3, 5, '在售');
INSERT INTO `house` (`id`, `name`, `province_id`, `city_id`, `qu_id`, `status`) VALUES (46, '万科5期', 5, 3, 5, '入住');
INSERT INTO `house` (`id`, `name`, `province_id`, `city_id`, `qu_id`, `status`) VALUES (47, '万科6期', 5, 3, 5, '入住');
INSERT INTO `house` (`id`, `name`, `province_id`, `city_id`, `qu_id`, `status`) VALUES (48, '万科7期', 5, 3, 5, '入住');
INSERT INTO `house` (`id`, `name`, `province_id`, `city_id`, `qu_id`, `status`) VALUES (49, '万科8期', 5, 3, 5, '入住');
INSERT INTO `house` (`id`, `name`, `province_id`, `city_id`, `qu_id`, `status`) VALUES (50, '万科9期', 5, 3, 5, '停工');
INSERT INTO `house` (`id`, `name`, `province_id`, `city_id`, `qu_id`, `status`) VALUES (51, '万科10期', 5, 3, 5, '停工');
INSERT INTO `house` (`id`, `name`, `province_id`, `city_id`, `qu_id`, `status`) VALUES (52, '万科11期', 5, 3, 5, '在售');
INSERT INTO `house` (`id`, `name`, `province_id`, `city_id`, `qu_id`, `status`) VALUES (53, '万科2期', 5, 3, 5, '在售');
INSERT INTO `house` (`id`, `name`, `province_id`, `city_id`, `qu_id`, `status`) VALUES (54, '万科3期', 5, 3, 5, '入住');
INSERT INTO `house` (`id`, `name`, `province_id`, `city_id`, `qu_id`, `status`) VALUES (55, '万科4期', 5, 3, 5, '在售');
INSERT INTO `house` (`id`, `name`, `province_id`, `city_id`, `qu_id`, `status`) VALUES (56, '万科5期', 5, 3, 5, '入住');
INSERT INTO `house` (`id`, `name`, `province_id`, `city_id`, `qu_id`, `status`) VALUES (57, '万科6期', 5, 3, 5, '停工');
INSERT INTO `house` (`id`, `name`, `province_id`, `city_id`, `qu_id`, `status`) VALUES (58, '万科7期', 5, 3, 5, '停工');
INSERT INTO `house` (`id`, `name`, `province_id`, `city_id`, `qu_id`, `status`) VALUES (59, '万科8期', 5, 3, 5, '入住');
INSERT INTO `house` (`id`, `name`, `province_id`, `city_id`, `qu_id`, `status`) VALUES (60, '万科9期', 5, 3, 5, '停工');
INSERT INTO `house` (`id`, `name`, `province_id`, `city_id`, `qu_id`, `status`) VALUES (61, '万科10期', 5, 3, 5, '停工');
INSERT INTO `house` (`id`, `name`, `province_id`, `city_id`, `qu_id`, `status`) VALUES (62, '万科11期', 5, 3, 5, '在售');
INSERT INTO `house` (`id`, `name`, `province_id`, `city_id`, `qu_id`, `status`) VALUES (63, '万科2期', 4, 3, 4, '在售');
INSERT INTO `house` (`id`, `name`, `province_id`, `city_id`, `qu_id`, `status`) VALUES (64, '万科3期', 4, 3, 4, '入住');
INSERT INTO `house` (`id`, `name`, `province_id`, `city_id`, `qu_id`, `status`) VALUES (65, '万科4期', 4, 3, 4, '在售');
INSERT INTO `house` (`id`, `name`, `province_id`, `city_id`, `qu_id`, `status`) VALUES (66, '万科5期', 4, 3, 4, '入住');
INSERT INTO `house` (`id`, `name`, `province_id`, `city_id`, `qu_id`, `status`) VALUES (67, '万科6期', 4, 3, 4, '停工');
INSERT INTO `house` (`id`, `name`, `province_id`, `city_id`, `qu_id`, `status`) VALUES (68, '万科7期', 5, 3, 4, '停工');
COMMIT;

-- ----------------------------
-- Table structure for province
-- ----------------------------
DROP TABLE IF EXISTS `province`;
CREATE TABLE `province` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb3;

-- ----------------------------
-- Records of province
-- ----------------------------
BEGIN;
INSERT INTO `province` (`id`, `name`) VALUES (1, '山东');
INSERT INTO `province` (`id`, `name`) VALUES (2, '山西');
INSERT INTO `province` (`id`, `name`) VALUES (3, '河北');
INSERT INTO `province` (`id`, `name`) VALUES (4, '河南');
INSERT INTO `province` (`id`, `name`) VALUES (5, '江苏');
COMMIT;

-- ----------------------------
-- Table structure for qu
-- ----------------------------
DROP TABLE IF EXISTS `qu`;
CREATE TABLE `qu` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb3;

-- ----------------------------
-- Records of qu
-- ----------------------------
BEGIN;
INSERT INTO `qu` (`id`, `name`) VALUES (1, '城南');
INSERT INTO `qu` (`id`, `name`) VALUES (2, '城北');
INSERT INTO `qu` (`id`, `name`) VALUES (3, '城东');
INSERT INTO `qu` (`id`, `name`) VALUES (4, '城西');
COMMIT;

-- ----------------------------
-- Table structure for room
-- ----------------------------
DROP TABLE IF EXISTS `room`;
CREATE TABLE `room` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `pic` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `idx_name` (`name`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb3;

-- ----------------------------
-- Records of room
-- ----------------------------
BEGIN;
INSERT INTO `room` (`id`, `name`, `pic`) VALUES (1, '101', 'https://foruda.gitee.com/avatar/1685610497471368994/12065236_hccxx_1685610497.png');
INSERT INTO `room` (`id`, `name`, `pic`) VALUES (2, '201', 'https://foruda.gitee.com/avatar/1685610497471368994/12065236_hccxx_1685610497.png');
INSERT INTO `room` (`id`, `name`, `pic`) VALUES (3, '301', 'https://foruda.gitee.com/avatar/1685610497471368994/12065236_hccxx_1685610497.png');
INSERT INTO `room` (`id`, `name`, `pic`) VALUES (4, '401', 'https://foruda.gitee.com/avatar/1685610497471368994/12065236_hccxx_1685610497.png');
INSERT INTO `room` (`id`, `name`, `pic`) VALUES (5, '501', 'https://foruda.gitee.com/avatar/1685610497471368994/12065236_hccxx_1685610497.png');
COMMIT;

-- ----------------------------
-- Table structure for student
-- ----------------------------
DROP TABLE IF EXISTS `student`;
CREATE TABLE `student` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `idx_name` (`name`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8mb3;

-- ----------------------------
-- Records of student
-- ----------------------------
BEGIN;
INSERT INTO `student` (`id`, `name`) VALUES (5, 'jerry');
INSERT INTO `student` (`id`, `name`) VALUES (4, 'tom');
INSERT INTO `student` (`id`, `name`) VALUES (9, '吴亦凡');
INSERT INTO `student` (`id`, `name`) VALUES (11, '川普');
INSERT INTO `student` (`id`, `name`) VALUES (1, '张三');
INSERT INTO `student` (`id`, `name`) VALUES (8, '张艺兴');
INSERT INTO `student` (`id`, `name`) VALUES (2, '李四');
INSERT INTO `student` (`id`, `name`) VALUES (6, '王一博');
INSERT INTO `student` (`id`, `name`) VALUES (3, '王五');
INSERT INTO `student` (`id`, `name`) VALUES (7, '蔡徐坤');
INSERT INTO `student` (`id`, `name`) VALUES (10, '马斯克');
COMMIT;

-- ----------------------------
-- Table structure for student_room
-- ----------------------------
DROP TABLE IF EXISTS `student_room`;
CREATE TABLE `student_room` (
  `id` int NOT NULL AUTO_INCREMENT,
  `student_id` int DEFAULT NULL,
  `room_id` int DEFAULT NULL,
  `apartment_id` int DEFAULT NULL,
  `create_time` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `idx_sid_rid_aid` (`student_id`,`room_id`,`apartment_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8mb3;

-- ----------------------------
-- Records of student_room
-- ----------------------------
BEGIN;
INSERT INTO `student_room` (`id`, `student_id`, `room_id`, `apartment_id`, `create_time`) VALUES (1, 1, 1, 1, '2023-04-10 09:11:16');
INSERT INTO `student_room` (`id`, `student_id`, `room_id`, `apartment_id`, `create_time`) VALUES (2, 2, 1, 1, '2023-04-09 09:11:39');
INSERT INTO `student_room` (`id`, `student_id`, `room_id`, `apartment_id`, `create_time`) VALUES (3, 3, 3, 3, '2023-04-10 09:11:53');
INSERT INTO `student_room` (`id`, `student_id`, `room_id`, `apartment_id`, `create_time`) VALUES (4, 4, 2, 2, '2023-04-08 09:21:26');
INSERT INTO `student_room` (`id`, `student_id`, `room_id`, `apartment_id`, `create_time`) VALUES (5, 5, 5, 5, '2023-04-09 09:21:30');
INSERT INTO `student_room` (`id`, `student_id`, `room_id`, `apartment_id`, `create_time`) VALUES (6, 6, 4, 1, '2023-04-10 15:35:09');
INSERT INTO `student_room` (`id`, `student_id`, `room_id`, `apartment_id`, `create_time`) VALUES (7, 7, 4, 1, '2023-04-10 15:35:25');
INSERT INTO `student_room` (`id`, `student_id`, `room_id`, `apartment_id`, `create_time`) VALUES (9, 9, 3, 5, '2023-05-12 14:26:46');
INSERT INTO `student_room` (`id`, `student_id`, `room_id`, `apartment_id`, `create_time`) VALUES (10, 8, 3, 5, '2023-05-12 14:27:07');
INSERT INTO `student_room` (`id`, `student_id`, `room_id`, `apartment_id`, `create_time`) VALUES (11, 10, 3, 5, '2023-06-07 16:14:44');
INSERT INTO `student_room` (`id`, `student_id`, `room_id`, `apartment_id`, `create_time`) VALUES (12, 11, 4, 1, '2023-07-06 16:04:36');
COMMIT;

-- ----------------------------
-- Table structure for user_info
-- ----------------------------
DROP TABLE IF EXISTS `user_info`;
CREATE TABLE `user_info` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `password` varchar(255) DEFAULT NULL,
  `salt` varchar(255) DEFAULT NULL,
  `nick_name` varchar(255) DEFAULT NULL,
  `avatar_url` varchar(255) DEFAULT NULL,
  `gitee_id` int DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb3;

-- ----------------------------
-- Records of user_info
-- ----------------------------
BEGIN;
INSERT INTO `user_info` (`id`, `name`, `password`, `salt`, `nick_name`, `avatar_url`, `gitee_id`) VALUES (4, 'admin', '685c70bb5cb7fd998853f724b36de7da', '50f8338b', 'Aikun', 'https://foruda.gitee.com/avatar/1688375543562089385/12065236_hccxx_1688375543.png', 12065236);
COMMIT;

-- ----------------------------
-- Table structure for yiqing
-- ----------------------------
DROP TABLE IF EXISTS `yiqing`;
CREATE TABLE `yiqing` (
  `id` int NOT NULL AUTO_INCREMENT,
  `region` varchar(255) DEFAULT NULL,
  `now_ definite` int DEFAULT NULL,
  `definite` int DEFAULT NULL,
  `death` int DEFAULT NULL,
  `cure` int DEFAULT NULL,
  `yesterday` int DEFAULT NULL COMMENT '0 全部,1 昨日新增',
  PRIMARY KEY (`id`),
  KEY `idx_yes` (`yesterday`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb3;

-- ----------------------------
-- Records of yiqing
-- ----------------------------
BEGIN;
INSERT INTO `yiqing` (`id`, `region`, `now_ definite`, `definite`, `death`, `cure`, `yesterday`) VALUES (1, '台湾', 400, 500, 50, 50, 0);
INSERT INTO `yiqing` (`id`, `region`, `now_ definite`, `definite`, `death`, `cure`, `yesterday`) VALUES (2, '北京', 800, 1000, 100, 100, 0);
INSERT INTO `yiqing` (`id`, `region`, `now_ definite`, `definite`, `death`, `cure`, `yesterday`) VALUES (3, '香港', 650, 800, 75, 75, 0);
INSERT INTO `yiqing` (`id`, `region`, `now_ definite`, `definite`, `death`, `cure`, `yesterday`) VALUES (4, '广州', 1600, 2000, 200, 200, 0);
INSERT INTO `yiqing` (`id`, `region`, `now_ definite`, `definite`, `death`, `cure`, `yesterday`) VALUES (5, '台湾', 400, 60, 10, 10, 1);
INSERT INTO `yiqing` (`id`, `region`, `now_ definite`, `definite`, `death`, `cure`, `yesterday`) VALUES (6, '北京', 800, 100, 20, 20, 1);
INSERT INTO `yiqing` (`id`, `region`, `now_ definite`, `definite`, `death`, `cure`, `yesterday`) VALUES (7, '香港', 650, 400, 50, 50, 1);
INSERT INTO `yiqing` (`id`, `region`, `now_ definite`, `definite`, `death`, `cure`, `yesterday`) VALUES (8, '广州', 1600, 600, 100, 100, 1);
COMMIT;

-- ----------------------------
-- Procedure structure for yiqing
-- ----------------------------
DROP PROCEDURE IF EXISTS `yiqing`;
delimiter ;;
CREATE PROCEDURE `yiqing`()
BEGIN

SELECT 

region as xdata,
definite as ydata1,
death as ydata2,
cure as ydata3 


from yiqing
where yesterday = 0;
END
;;
delimiter ;

-- ----------------------------
-- Procedure structure for yiqingByParam
-- ----------------------------
DROP PROCEDURE IF EXISTS `yiqingByParam`;
delimiter ;;
CREATE PROCEDURE `yiqingByParam`(IN y int)
BEGIN
SELECT 

region as xdata,
definite as ydata1,
death as ydata2,
cure as ydata3 


from yiqing
where yesterday = y;
END
;;
delimiter ;

-- ----------------------------
-- Procedure structure for zzt
-- ----------------------------
DROP PROCEDURE IF EXISTS `zzt`;
delimiter ;;
CREATE PROCEDURE `zzt`()
BEGIN
  SELECT COUNT(*) as ydata, province.`name` as xdata 
FROM house 
LEFT JOIN province on house.province_id = province.id
 GROUP BY house.province_id;
END
;;
delimiter ;

-- ----------------------------
-- Procedure structure for zztByParam
-- ----------------------------
DROP PROCEDURE IF EXISTS `zztByParam`;
delimiter ;;
CREATE PROCEDURE `zztByParam`(IN stu varchar(50))
BEGIN
if stu is null or stu = '' then 
  SELECT COUNT(*) as ydata, province.`name` as xdata 
FROM house 
LEFT JOIN province on house.province_id = province.id
 GROUP BY house.province_id;
 ELSE
   SELECT COUNT(*) as ydata, province.`name` as xdata 
FROM house 
LEFT JOIN province on house.province_id = province.id
where house.`status` = stu
 GROUP BY house.province_id;
 end IF;
END
;;
delimiter ;

SET FOREIGN_KEY_CHECKS = 1;
